﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="EmployeeSearchControl.ascx.cs" Inherits="Legazpi.Payroll.Web.Usercontrols.EmployeeSearchControl" %>
        
        <script src="<%=ResolveUrl("~/Scripts/Employee/Employee.js")%>" type="text/javascript"></script>       
        
        <link rel="stylesheet" href="<%=ResolveUrl("~/Scripts/DataTable/css/demo_table.css")%>" type="text/css" />    
        <script type="text/javascript" src="<%=ResolveUrl("~/Scripts/DataTable/js/jquery.dataTables.min.js")%>"></script>
        <script language="javascript" type="text/javascript">
            var employeeViewUrl = '<%=ResolveUrl("~/Admin/EmployeeView.aspx/")%>';
            Employee.EmployeeViewUrl = employeeViewUrl;
            $(document).ready(function () {
                $('#EmployeeTbl').dataTable({
                    "bJQueryUI": true,
                    'sPaginationType': 'full_numbers',
                    'iDisplayLength': 25,
                    "bPaginate": true,
                    "bProcessing": true,
                    "aoColumnDefs": [
                        { "bSortable": false, "sWidth": "20%", "aTargets": [4] }
                     ],                                                     
                    "bServerSide": false
                });
            });
        </script>

        <h2>
            Employee Listings
        </h2>
        <hr /><br />
        <asp:Button ID="btnAddNewEmployee" runat="server" Text="Add New" 
    onclick="btnAddNewEmployee_Click" />
        <br />
         <br />
        <asp:Repeater ID="repeater" runat="server">
            <HeaderTemplate>
                <table id="EmployeeTbl" cellpadding="1" cellspacing="0" 
                    border="0" class="display">
                  <thead>
                    <tr>
                        <th align="left">Id</th>
                        <th align="left">Code</th>
                        <th align="left">Fullname</th>
                        <th align="left">Position</th>
                        <th align="left"></th>
                    </tr>
                  </thead>
                <tbody>
            </HeaderTemplate>
            <ItemTemplate>
                <tr>
                  <td><%# Eval("Id") %></td>
                  <td><%# Eval("EmployeeCode")%></td>
                  <td><%# Eval("Fullname")%></td>
                  <td><%# Eval("Position")%></td>
                  <td>
                    <input type="button" value="Update" class="btnUdpate" data-id="<%# Eval("Id") %>"  />
                    <input type="button" value="Delete" class="btnDelete" data-id="<%# Eval("Id") %>"  />
                  </td>
                </tr>
            </ItemTemplate>
            <FooterTemplate>
                    </tbody>
                </table>
            </FooterTemplate>
        </asp:Repeater>

    